import { getData} from './request';

export default async(store,type)=>{
      
  const data = await getData(type);
       
   if (data.error_code) {
  store.commit('setErrorCode',data.error_code)
   return;
      }
     store.commit('setData',data);
}